package com.hbnu.system.controller;


import com.hbnu.system.core.base.Rest;
import com.hbnu.system.model.entity.SourceUnitType;
import com.hbnu.system.service.ISourceUnitTypeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 来源单位类型选项表 前端控制器
 * </p>
 *
 * @author jxl
 * @since 2025-07-12
 */
@Api(tags = "来源单位类型选项表（仅适用于国有企业/民营企业）模块")
@RestController
@RequestMapping("/source-unit-type")
public class SourceUnitTypeController {

    @Autowired
    private ISourceUnitTypeService sourceUnitTypeService;


    @ApiOperation("获取所有来源单位类型选项")
    @GetMapping("/getAll")
    public Rest<List<SourceUnitType>> getAll() {
        List<SourceUnitType> sourceUnitType = sourceUnitTypeService.list();
        return Rest.success(sourceUnitType);
    }


}
